﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using DTO;

namespace DAO
{
  public class DiemMonDAO
    {
        public static void Insert(DiemMonDTO d)
        {
            String sSQL = "insert into diem_mon(id_lop, id_hs, id_hk, id_mh, d_mieng_1, d_mieng_2, d_mieng_3, d_15_phut_1, d_15_phut_2, d_15_phut_3, d_1_tiet_1, d_1_tiet_2, d_1_tiet_3, d_thi, dtb) values ";
            sSQL += "( " + d.Id_lop + ", " + d.Id_hs + ", " + d.Id_hk + ", " + d.Id_mh + ", " + d.D_mieng_1 + ", " + d.D_mieng_2 + ", " + d.D_mieng_3;
            sSQL += ", " + d.D_15_phut_1 + ", " + d.D_15_phut_2 + ", " + d.D_15_phut_3 + ", " + d.D_1_tiet_1 + ", " + d.D_1_tiet_2 + ", " + d.D_1_tiet_3 + "," + d.D_thi + ", " + d.Dtb + " )";
            DAO.KetNoi.clsConnect.executeNonQuery(sSQL);
        }
        public static void delete(int hk, int lop, int mon)
        {
            String sSQL = "delete from diem_mon where id_hk = " + hk + " and id_lop = " + lop + " and id_mh = " + mon;
            DAO.KetNoi.clsConnect.executeNonQuery(sSQL);
           
        }
    }
}
